home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / sgwnd10 / stopscre.swt < prev    next >
Encoding:
Text File  |  1998-08-10  |  1.6 KB  |  68 lines

  1. {{Handle}}
  2. {CodeBlock}
  3.  {Location}=[CodeModule];Event:[HandlerName]:Message;Begin
  4. {Code}
  5.     
  6.     ' --- SGWindow Wizard generated code
  7.     wParam = (wParam And &HFFF0)
  8.     If (msg = WM_SYSCOMMAND) And (wParam = SC_SCREENSAVE) Then
  9.         ' Do not call default window procedure
  10.         result = 0
  11.         exit sub
  12.     End If
  13.     
  14.     ' Default processing for other system commands
  15.     result = [HandlerName].CallWindowProc(msg, wParam, lParam)
  16. {EndCode}
  17.  
  18. {{Declare}}
  19. {CodeBlock}
  20.  {Location}=[CodeModule];Global;End
  21. {Code}
  22.     
  23. ' --- SGWindow Wizard generated code
  24. Public WithEvents [HandlerName] As sgWindow.Window 
  25. {EndCode}
  26.  
  27. {{Init}}
  28. {CodeBlock}
  29.  {Location}=[CodeModule];Event:Form:Load;Begin
  30. {Code}
  31.     
  32.     ' --- SGWindow Wizard generated code
  33.     Set [HandlerName] = New sgWindow.Window
  34.     [HandlerName].HWND = Me.HWND
  35.     [HandlerName].Hooked = True
  36.     [HandlerName].EnableMessage WM_SYSCOMMAND, True
  37. {EndCode}
  38.  
  39. {CodeBlock}
  40.  {Location}=[CodeModule];Global;End
  41. {Code}
  42.     
  43. ' --- SGWindow Wizard generated code
  44. ' System command constants
  45. ' For a description of this commands take a look at the Win32 SDK
  46. Const SC_SIZE = &HF000&
  47. Const SC_MOVE = &HF010&
  48. Const SC_MINIMIZE = &HF020&
  49. Const SC_MAXIMIZE = &HF030&
  50. Const SC_NEXTWINDOW = &HF040&
  51. Const SC_PREVWINDOW = &HF050&
  52. Const SC_CLOSE = &HF060&
  53. Const SC_VSCROLL = &HF070&
  54. Const SC_HSCROLL = &HF080&
  55. Const SC_MOUSEMENU = &HF090&
  56. Const SC_KEYMENU = &HF100&
  57. Const SC_ARRANGE = &HF110&
  58. Const SC_RESTORE = &HF120&
  59. Const SC_TASKLIST = &HF130&
  60. Const SC_SCREENSAVE = &HF140&
  61. Const SC_HOTKEY = &HF150&
  62. Const SC_DEFAULT = &HF160&
  63. Const SC_MONITORPOWER = &HF170&
  64. Const SC_CONTEXTHELP = &HF180&
  65. Const SC_SEPARATOR = &HF00F&
  66. {EndCode}
  67.  
  68.